<script setup lang="ts">
import {
  NMessageProvider,
  MessageProviderProps,
  NNotificationProvider,
  NotificationProviderProps,
} from 'naive-ui'

/**
 * 组件配置选项
 */
defineOptions({
  name: 'StnTipProvider',
})

/**
 * 组件参数
 */
const {
  messageProviderProps = {},
  notificationProviderProps = {},
} = defineProps<{
  // 信息提示 Provider 组件参数对象
  messageProviderProps?: MessageProviderProps,
  // 通知提示 Provider 组件参数对象
  notificationProviderProps?: NotificationProviderProps,
}>()
</script>

<template>
  <div class="stn-tip-provider">
    <n-message-provider v-bind="messageProviderProps">
      <n-notification-provider v-bind="notificationProviderProps">
        <slot></slot>
      </n-notification-provider>
    </n-message-provider>
  </div>
</template>

<style scoped lang="scss">
.stn-tip-provider {
  width: 100%;
  height: 100%;
}
</style>
